home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / managers / mc-3.2 / mc-3 / mc-3.2.1 / src / mem.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-17  |  764 b   |  29 lines

  1. #ifndef __MEM_H
  2. #define __MEM_H
  3.  
  4. #if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
  5. #   include <string.h>
  6.     /* An ANSI string.h and pre-ANSI memory.h might conflict */
  7. #   if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
  8. #       include <memory.h>
  9. #   endif /* not STDC_HEADERS and HAVE_MEMORY_H */
  10.  
  11. #   ifndef index
  12. #define index strchr
  13. #   endif
  14.  
  15. #   ifndef rindex 
  16. #       define rindex strrchr
  17. #   endif
  18.  
  19. #   define bcopy(s,d,n) memcpy ((d), (s), (n))
  20. #   define bcmp(s1,s2,n) memcmp ((s1), (s2), (n))
  21. #   define bzero(s,n) memset ((s), 0, (n))
  22.  
  23. #else /* not STDC_HEADERS and not HAVE_STRING_H */
  24. #   include <strings.h>
  25.     /* memory and strings.h conflict on other systems */
  26. #endif /* not STDC_HEADERS and not HAVE_STRING_H */
  27. #endif     /* __MEM_H */
  28.  
  29.